<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>sccs</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_1954">&nbsp;</a>NAME</h4><blockquote>
sccs - front end for the SCCS subsystem (<b>DEVELOPMENT</b>)
</blockquote><h4><a name = "tag_001_014_1955">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

sccs <b>[</b>-r<b>][</b>-d <i>path</i><b>][</b>-p <i>path</i><b>] </b><i>command </i><b>[</b><i>options</i>...<b>][</b><i>operands</i>...<b>]</b>
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_1956">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>sccs</i>
utility
is a front end to the SCCS programs.
It also includes
the capability to run set-user-id to another user to provide
additional protection.
<p>
The
<i>sccs</i>
utility invokes the specified
<i>command</i>
with the specified
<i>options</i>
and
<i>operands</i>.
By default, each of the
<i>operands</i>
is modified by prefixing it with the string
SCCS/s..
<p>
The
<i>command</i>
operand can be one of the SCCS utilities in this specification
(<i>admin</i>,
<i><a href="delta.html">delta</a></i>,
<i><a href="get.html">get</a></i>,
<i><a href="prs.html">prs</a></i>,
<i><a href="rmdel.html">rmdel</a></i>,
<i><a href="sact.html">sact</a></i>,
<i><a href="unget.html">unget</a></i>,
<i><a href="val.html">val</a></i>
or
<i><a href="what.html">what</a></i>)
or one of the pseudo-utilities listed in the
EXTENDED DESCRIPTION section.
</blockquote><h4><a name = "tag_001_014_1957">&nbsp;</a>OPTIONS</h4><blockquote>
The
<i>sccs</i>
utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> ,
except that
<i>options</i>
operands are actually options to be passed to the utility named by
<i>command</i>.
When the portion of the command:
<p><code>
<i>command</i>
<b>[</b><i>options&nbsp;...</i><b>]</b>
<b>[</b><i>operands&nbsp;...</i><b>]</b>
</code>
is considered, all of the pseudo-utilities used as
<i>command</i>
support the Utility Syntax Guidelines.
Any of the other SCCS utilities that can be invoked
in this manner support the Guidelines to the extent
indicated by their individual OPTIONS sections.
<p>
The following options are supported preceding the
<i>command</i>
operand:
<dl compact>

<dt><b>-d&nbsp;</b><i>path</i>
<dd>A pathname of a directory to be used as a root directory
for the SCCS files.
The default is the current directory.
The
<b>-d</b>
option takes precedence over the
<i>PROJECTDIR</i>
variable.
See
<b>-p</b>.

<dt><b>-p&nbsp;</b><i>path</i>
<dd>A pathname of a directory in which the SCCS files are located.
The default is the
<b>SCCS</b>
directory.

The
<b>-p</b>
option differs from the
<b>-d</b>
option in that the
<b>-d</b>
option-argument is prefixed to the entire pathname and the
<b>-p</b>
option-argument is inserted before the final component of the pathname.
For example:
<pre>
<code>
sccs -d /x -p y get a/b
</code>
</pre>
will convert to:
<pre>
<code>
get /x/a/y/s.b
</code>
</pre>

This allows the creation of aliases such as:
<pre>
<code>
alias syssccs="sccs -d /usr/src"
</code>
</pre>
which will be used as:
<pre>
<code>
syssccs get cmd/who.c
</code>
</pre>

<dt><b>-r</b>
<dd>Invoke
<i>command</i>
with the real user ID of the process, not any effective user ID
that the
<i>sccs</i>
utility is set to.
Certain commands
(<i>admin</i>,
<b>check</b>,
<b>clean</b>,
<b>diffs</b>,
<b>info</b>,
<i><a href="rmdel.html">rmdel</a></i>
and
<b>tell</b>)
cannot be run set-user-ID
by all users, since this would allow anyone to change the
authorisations.
These commands are always run as the real user.

</dl>
<br>
</blockquote><h4><a name = "tag_001_014_1958">&nbsp;</a>OPERANDS</h4><blockquote>
The following operands are supported:
<dl compact>

<dt><i>command</i><dd>
An SCCS utility name or the name of one of the
pseudo-utilities listed in the EXTENDED DESCRIPTION section.

<dt><i>options</i><dd>An option or option-argument to be passed to
<i>command</i>.

<dt><i>operands</i><dd>
An operand to be passed to
<i>command</i>.

</dl>
</blockquote><h4><a name = "tag_001_014_1959">&nbsp;</a>STDIN</h4><blockquote>
See the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1960">&nbsp;</a>INPUT FILES</h4><blockquote>
See the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1961">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>sccs</i>:
<dl compact>

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_CTYPE</i><dd>
Determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single-
as opposed to multi-byte characters in arguments and input files).

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
<dt><i>PROJECTDIR</i><dd>
Provide a default value for the
<b>-d</b>&nbsp;<i>path</i>
option.
If the value of
<i>PROJECTDIR</i>
begins with a slash, it is considered an absolute pathname;
otherwise,
the home directory of a user of that name is examined for a
<b>src</b>
subdirectory
or
<b>source</b>.
If such a directory is found, it is used.
Otherwise, the value is used as a relative pathname.

</dl>
<p>
Additional environment variable effects may be found
in the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1962">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_1963">&nbsp;</a>STDOUT</h4><blockquote>
See the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1964">&nbsp;</a>STDERR</h4><blockquote>
See the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1965">&nbsp;</a>OUTPUT FILES</h4><blockquote>
See the utility description for the specified
<i>command</i>.
</blockquote><h4><a name = "tag_001_014_1966">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
The following pseudo-utilities are supported as
<i>command</i>
operands.
All options referred to in the following list are values given in the
<i>options</i>
operands following
<i>command</i>.
<dl compact>

<dt><b>check</b><dd>Equivalent to
<b>info</b>,
except that nothing is printed if nothing is being edited,
and a non-zero exit status is returned if anything is being edited.
The intent is to have this included in an &quot;install&quot; entry in a makefile to
ensure that everything is included into the SCCS file before a version
is installed.

<dt><b>clean</b><dd>Remove everything from the current directory that can be
recreated from SCCS files,
but do not remove any files being edited.
If the
<b>-b</b>
option is given, branches are ignored in the determination of
whether they are being edited;
this is dangerous if
branches are kept in the same directory.

<dt><b>create</b><dd>Create an SCCS file, taking the initial contents from the file of the
same name.
Any options to
<i><a href="admin.html">admin</a></i>
are accepted.
If the creation is
successful, the original files are renamed by
prefixing the basenames with a comma.
These renamed files should be removed after it has been verified
that the SCCS files have been created successfully.

<dt><b>delget</b><dd>Perform a
<i><a href="delta.html">delta</a></i>
on the named files and then
<i><a href="get.html">get</a></i>
new versions.
The new
versions will have ID keywords expanded and will not be editable.
Any
<b>-m</b>,
<b>-p</b>,
<b>-r</b>,
<b>-s</b>,
and
<b>-y</b>
options will be passed to
<i><a href="delta.html">delta</a></i>,
and any
<b>-b</b>,
<b>-c</b>,
<b>-e</b>,
<b>-i</b>,
<b>-k</b>,
<b>-l</b>,
<b>-s</b>
and
<b>-x</b>
options will be passed to
<i><a href="get.html">get</a></i>.

<dt><b>deledit</b><dd>Equivalent to
<b>delget</b>,
except that the
<i><a href="get.html">get</a></i>
phase includes the
<b>-e</b>
option.
This option is useful for making a checkpoint of the current editing phase.
The same options will be passed to
<i><a href="delta.html">delta</a></i>
as described above, and
all the options listed for
<i><a href="get.html">get</a></i>
above except
<b>-e</b>
are passed to
<b>edit</b>.

<dt><b>diffs</b><dd>Write a difference listing between the current version of the files
checked out for editing and the versions in SCCS format.
Any
<b>-r</b>,
<b>-c</b>,
<b>-i</b>,
<b>-x</b>
and
<b>-t</b>
options are passed to
<i><a href="get.html">get</a></i>;
any
<b>-l</b>,
<b>-s</b>,
<b>-e</b>,
<b>-f</b>,
<b>-h</b>
and
<b>-b</b>
options are passed to
<i><a href="diff.html">diff</a></i>.
A
<b>-C</b>
option is passed to
<i><a href="diff.html">diff</a></i>
as
<b>-c</b>.

<dt><b>edit</b><dd>Equivalent to
<i><a href="get.html">get</a></i>
<b>-e</b>.

<dt><b>fix</b><dd>Remove the
named delta, but leave a copy of the delta with the changes
that were in it.
It is useful for fixing small compiler bugs, and so on.
It must be followed by a
<b>-r</b>&nbsp;<i>SID</i>
option.
Since
<b>fix</b>
doesn't leave audit trails, it should be used carefully.

<dt><b>info</b><dd>Write a listing of all files being edited.
If the
<b>-b</b>
option is given,
branches (that is, SIDs with two or fewer components) are ignored.
If a
<b>-u</b>&nbsp;<i>user</i>
option is given, then only files being
edited by the named user are listed.
A
<b>-U</b>
option is equivalent to
<b>-u</b>
&lt;<i>current&nbsp;user</i>&gt;.

<dt><b>print</b><dd>Write out verbose information about the named files,
equivalent to
<i>sccs</i>
<i><a href="prs.html">prs</a></i>.

<dt><b>tell</b><dd>Write a
newline-separated
list of the files being edited to standard output.
Takes the
<b>-b</b>,
<b>-u</b>
and
<b>-U</b>
options like
<b>info</b>
and
<b>check</b>.

<dt><b>unedit</b><dd>This is the opposite of an
<b>edit</b>
or a
<i><a href="get.html">get</a></i>
<b>-e</b>.
It should be used with
caution, since any changes made since the
<i><a href="get.html">get</a></i>
will be lost.

</dl>
<br>
</blockquote><h4><a name = "tag_001_014_1967">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>Successful completion.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_1968">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_1969">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
Many of the SCCS utilities take directory names as operands
as well as specific filenames.
The pseudo-utilities supported by
<i>sccs</i>
are not described as having this capability,
but are not prohibited from doing so.
</blockquote><h4><a name = "tag_001_014_1970">&nbsp;</a>EXAMPLES</h4><blockquote>
<ol>
<p>
<li>
To get a file for editing, edit it and produce a new delta:
<pre>
<code>
sccs get -e file.c
ex file.c
sccs delta file.c
</code>
</pre>
<p>
<li>
To get a file from another directory:
<pre>
<code>
sccs -p /usr/src/sccs/s. get cc.c
</code>
</pre>
or:
<pre>
<code>
sccs get /usr/src/sccs/s.cc.c
</code>
</pre>
<p>
<li>
To make a delta of a large number of files in the current directory:
<pre>
<code>
sccs delta *.c
</code>
</pre>
<p>
<li>
To get a list of files being edited that are not on branches:
<pre>
<code>
sccs info -b
</code>
</pre>
<p>
<li>
To delta everything being edited by the current user:
<pre>
<code>
sccs delta $(sccs tell -U)
</code>
</pre>
<p>
<li>
In a makefile, to get source files from an SCCS file if it
does not already exist:
<pre>
<code>
SRCS = &lt;<i>list of source files</i>&gt;
$(SRCS):
    sccs get $(REL) $@
</code>
</pre>
<p>
</ol>
</blockquote><h4><a name = "tag_001_014_1971">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1972">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="admin.html">admin</a></i>,
<i><a href="delta.html">delta</a></i>,
<i><a href="get.html">get</a></i>,
<i><a href="make.html">make</a></i>,
<i><a href="prs.html">prs</a></i>,
<i><a href="rmdel.html">rmdel</a></i>,
<i><a href="sact.html">sact</a></i>,
<i><a href="unget.html">unget</a></i>,
<i><a href="val.html">val</a></i>,
<i><a href="what.html">what</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
